how to sort an array of strings by length in java